import { createApp } from 'vue'
import index from './index.vue'

export default (options:any) => {
    // 创建一个节点，并将组件挂载上去
    const root:any = document.createElement('div')
    // root.style.position='fixed'
    document.body.appendChild(root)

    const app = createApp(index, {
        ...options, visible: true, remove() {
            app.unmount(root) //创建完后要进行销毁
            document.body.removeChild(root)
        }
    })
    return app.mount(root)
}